using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerBullet : Bullet
{
    public override void OnHitEnemy(EnemyControl enemyControl)
    {
        base.OnHitEnemy(enemyControl);
        //Debug.Log(transform.eulerAngles.z);
        GameMgr.Get<IEnemyManager>().Damage(enemyControl, bulletData.Damage, 
            new DamageArgs() { directionAngle = transform.eulerAngles.z + 90, source = transform.position });
        AudioControl.Instance.PlaySound("Bullet_Hit");
        OnDestory();
    }

    public override void OnHitGround(Vector2 normal)
    {
        base.OnHitGround(normal);
        OnDestory();
    }
}
